package com.jsh.erp.controller.api;

import com.jsh.erp.service.supplier.SupplierService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.math.BigDecimal;

@RequestMapping("/api")
@RestController
public class SupplierRemoteApi {
    @Autowired
    private SupplierService supplierService;

    @GetMapping("/supplier/updateAdvanceIn")
    public int updateAdvanceIn(@RequestParam("supplierId") Long supplierId,
                               @RequestParam("advanceIn") BigDecimal advanceIn)throws Exception {
        return supplierService.updateAdvanceIn(supplierId, advanceIn);
    }

}
